from google.appengine.ext import db

class User(db.Model):
    
    # fm_user_id = db.StringProperty()
    
    ig_access_token = db.StringProperty()
    
    ig_user_id = db.StringProperty()
    ig_username = db.StringProperty()
    ig_full_name = db.StringProperty()
    
    sc_access_token = db.StringProperty()
    
    sc_user_id = db.StringProperty()
    sc_username = db.StringProperty()
    sc_full_name = db.StringProperty()

    def instagram_connected(self):
        return (self.ig_access_token and self.ig_user_id)
    
    def soundcloud_connected(self):
        return (self.sc_access_token and self.sc_user_id)
    
    def fully_connected(self):
        return (self.instagram_connected() and self.soundcloud_connected())